<template>
  <div class="detail-card" @click="gotoDetail(data, router, axios)">
    <img
      :src="data.icon"
      alt=""
    />
    <div>
      <span class="title"> {{data.name}} </span>
    </div>
  </div>
</template>
  
  <script setup>
import { ref } from "vue";
import { useRoute, useRouter } from "vue-router";
const router = ref(useRouter());
const props = defineProps({
  data: {
    type: Object,
    default: () => {},
  },
});
const values = ref(5);
</script>
  
  <style lang="less" scoped>
.flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.detail-card {
  width: 200px;
  cursor: pointer;
  img {
    width: 196px;
    height: 104px;
    border-radius: 8px;
    margin-bottom: 10px;
  }
  .title {
    font-size: 16px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #1d2127;
    line-height: 16px;
  }
  &:hover {
    .title {
      color: @link-color;
    }
    img {
      margin-top: -4px;
      width: 200px;
      height: 108px;
      transition: all 0.1s;
      opacity: 0.6;
    }
  }
}

.el-rate {
  &::v-deep(.el-rate__icon) {
    font-size: 12px;
    margin-right: 0px;
  }
}
</style>